package com;

import com.model.*;

import com.model.game.HgResponse;
import dubbo.PageDataService;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.RunWith;
import org.junit.runner.notification.Failure;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Date;
import java.util.Random;

import static org.junit.Assert.assertEquals;

@RunWith(SpringRunner.class)
@SpringBootTest
public class WebsiteTest {

    @Autowired
    PageDataService pageDataService;

    public int userId = 26;

    /**
     * AccountId :userName
     * timeRange: 1,2,3 多长时间的
     */
    @Test
    public void hgFlowData() {
        HgFlowData hgFlowData = new HgFlowData();
        hgFlowData.setAccountId("testName");
        hgFlowData.setTimeRange(3);
        ResponseMsg result =  pageDataService.hgFlowData(hgFlowData);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
    }


    /**
     * userId
     * gameType sbhg  / pt 两个类型
     *
     * @return
     */
    @Test
    public void getPromotions() {
        ResponseMsg result = new ResponseMsg();
        GamePromotion gamePromotions = new GamePromotion();
        gamePromotions.setUserId(26);
        //gamePromotions.setGameType("pt");
        result = pageDataService.getTransferPromotions(26);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));

        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/updatePasswordByClient  修改密码
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {String} oldPassword
     * @apiParam {String} newPassword
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void updatePasswordByClient() {

        Users userPage1 = new Users();
        userPage1.setUserId(userId);
        userPage1.setOldPassword("1234567");
        userPage1.setNewPassword("123456");
        ResponseMsg result = pageDataService.updatePasswordByClient(userPage1);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());

    }


    /**
     * @api {POST} /client/reSetPasswordByClient  重设密码
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 用户详情-->按页面来传参数
     * @apiParam {int} userId
     * @apiParam {String} newPassword
     * @apiSuccess {String} status 消息状态 success afiled
     */
    @Test
    public void reSetPasswordByoldPassword() {
        Users userPage1 = new Users();
        userPage1.setUserId(userId);
        userPage1.setNewPassword("1234567");
        ResponseMsg result = pageDataService.reSetPasswordByoldPassword(userPage1);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/bindingEmailByClient 绑定邮箱
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {String} email
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void bindingEmailByClient() {

        Users userPage1 = new Users();
        userPage1.setUserId(userId);
        userPage1.setEmail("test@qq.com");
        ResponseMsg result = pageDataService.bindingEmailByClient(userPage1);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/bindingPhoneByClient 绑定手机
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {String} phone
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void bindingPhoneByClient() {
        Users userPage1 = new Users();
        userPage1.setUserId(userId);
        userPage1.setPhone("11711584654");
        ResponseMsg result = pageDataService.bindingPhoneByClient(userPage1);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());

    }

    /**
     * @api {POST} /client/updateUserInfoByClient  更新用户信息
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 用户详情-->按页面来传参数
     * @apiParam {int} userId
     * @apiParam {String} sex
     * @apiParam {String} birthday
     *
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void updateUserInfoByClient() {
        ResponseMsg result = new ResponseMsg();
        Users userPage = new Users();
        userPage.setBirthday("1992-02-15");
        userPage.setUserId(userId);
        userPage.setSex(1);
        userPage.setProvince("河北省");
        userPage.setCity("北京市");
        userPage.setArea("海淀区");
        userPage.setAddressDetails("北京市故宫工业区");

        result  =  pageDataService.updateUserInfoByClient(userPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/refreshUserInfoByClient  刷新用户信息
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 用户详情-->按页面来传参数
     * @apiParam {int} userId
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void refreshUserInfoByClient() {

        Users userPage1 = new Users();
        userPage1.setUserId(userId);
        //userPage1.setUserName("testName");
        //userPage1.setRealName("有数据");
        ResponseMsg result = pageDataService.refreshUserInfoByClient(userPage1);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }



    @Test
    public void testMain(){
        Result result = JUnitCore.runClasses(WebsiteTest.class);

        for (Failure failure : result.getFailures()) {
            System.out.println(failure.toString());
        }

        System.out.println(result.wasSuccessful());
    }




    /**
     * @api {POST} /client/banklistByClient 银行卡列表
     * @apiGroup BankController
     * @apiVersion 0.0.1
     * @apiParam {int} userId
     * @apiDescription 交易记录
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void userBankList() {
        ResponseMsg msg = new ResponseMsg();
        UserBank userBank = new UserBank();
        userBank.setUserId(userId);
        ResponseMsg result =  pageDataService.userBankList(userBank);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));

        assertEquals(ResponseMsg.success, result.getStatus());

    }

    /**
     * @api {POST} /client/deleteBankByClient 删除银行卡
     * @apiGroup BankController
     * @apiVersion 0.0.1
     * @apiParam {int} userId
     * @apiParam {int} bankId
     * @apiDescription 交易记录
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void deleteBankByClient() {

        ResponseMsg msg = new ResponseMsg();
        UserBank userBank = new UserBank();
        userBank.setUserId(userId);
        userBank.setBankId(3);
        ResponseMsg result =  pageDataService.deleteBankByClient( userBank );
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());

    }

    /**
     * @api {POST} /client/addBankByClient 添加银行卡
     * @apiGroup BankController
     * @apiVersion 0.0.1
     * @apiParam {int} userId
     * @apiParam {String} bankName
     * @apiParam {String} bankNo
     * @apiParam {String} branchBankName
     * @apiDescription 交易记录
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void addBankByClient() {
        ResponseMsg msg = new ResponseMsg();
        UserBank userBank = new UserBank();
        userBank.setUserId(userId);
        userBank.setUserBankName("工商银行");
        userBank.setUserBankAccountName("小李");
        userBank.setUserBankNo("6222024000079811432");
        userBank.setUserBranchBankName( "深圳支行" );
        ResponseMsg result =  pageDataService.addBankByClient(userBank);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/depositChannelByClientUserId 获取通道byUserId
     * @apiGroup ClientDepositController
     * @apiVersion 0.0.1
     * @apiDescription 获取在线通道
     * @apiParam {int} userId
     * @apiParam {int} depositGroupId //从用户信息中获取
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void depositChannelByClientUserId() {
        Users userPage1 = new Users();
        userPage1.setUserId(userId);
        userPage1.setDepositGroupId(101);
        ResponseMsg result =  pageDataService.depositChannelByClientUserId(userPage1);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }


    /**
     * @api {POST} /client/addOnlineDepositOrderByClient 添加在线存款订单
     * @apiGroup ClientDepositController
     * @apiVersion 0.0.1
     * @apiDescription 在线
     * @apiParam {int} userId
     * @apiParam {String} requestDepositAmount
     * @apiParam {String} userName
     * @apiParam {String} lastLoginIp
     * @apiParam {String} depositChannelId
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void addOnlineDepositOrderByClient() {
        DepositOrder depositOrderPage = new DepositOrder();
        depositOrderPage.setUserId(userId);
        depositOrderPage.setDepositChannelId(1);
        depositOrderPage.setLastloginIp("127.0.0.1");
        depositOrderPage.setUserName("louie");
        depositOrderPage.setRequestDepositAmount(11.0);
        ResponseMsg result =  pageDataService.addOnlineDepositOrderByClient(depositOrderPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/getChannelBanksById 获取该通道支持的银行卡列表
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 获取在线通道
     * @apiParam {int} depositGroupId //从用户信息中获取
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void getChannelBanksById() {
        ResponseMsg msg = new ResponseMsg();
        DepositChannelBanks depositChannelBanksPage = new DepositChannelBanks();
        depositChannelBanksPage.setDepositChannelId(1);
        ResponseMsg result =  pageDataService.getChannelBanksById(depositChannelBanksPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }


    /**
     * @api {POST} /client/addOfflineDepositOrderByClient 添加离线存款订单
     * @apiGroup ClientDepositController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {int} userName
     * @apiParam {int} lastLoginIp
     * @apiParam {String} requestDepositAmount
     * @apiParam {String} userBankNo
     * @apiParam {String} userBankName
     * @apiParam {String} userBankAccountName
     * @apiParam {String} offlineAccountName
     * @apiParam {String} offlineBankNo
     * @apiParam {String} offlineBankName
     * @apiParam {String} offlineBankBranchName
     * @apiParam {String} offlineType
     * @apiParam {String}  depositChannelId 假如不为0 就直接取上面的值
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void addOfflineDepositOrderByClient() {
        DepositOrder depositOrderPage = new DepositOrder();
        depositOrderPage.setUserId(userId);
        depositOrderPage.setUserName("louie");
        depositOrderPage.setDepositChannelId(73);
        depositOrderPage.setOfflineType("网上转账");
        depositOrderPage.setLastloginIp("127.0.0.1");
        depositOrderPage.setUserBankAccountName("小李");
        depositOrderPage.setUserBankName("中国银行");
        depositOrderPage.setUserBankNo("1234");
        depositOrderPage.setLastloginIp("127.0.0.1");
        depositOrderPage.setRequestDepositAmount(11.2);
        ResponseMsg result =  pageDataService.addOfflineDepositOrderByClient(depositOrderPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/loginSubmit 用户登录
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiParam {String} userName
     * @apiParam {String} password
     * @apiParam {String} lastloginIp
     * @apiDescription 用户登录接口
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void loginSubmit() {
        Users userPage = new Users();
        userPage.setUserName("testName");
        userPage.setPassword("123456");
        userPage.setLastloginIp("127.0.0.1");
        ResponseMsg result =  pageDataService.loginSubmit(userPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/loginSubmit 游戏接口登录
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiParam {String} userName
     * @apiParam {String} gameType 当前传 hg
     * @apiDescription 游戏接口登录
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */

    @Test
    public void loginGameSubmit() {
        Users userPage = new Users();
        userPage.setUserName("testName");
        userPage.setPassword("123456");
        userPage.setLastloginIp("127.0.0.1");
        ResponseMsg result =  pageDataService.loginGameSubmit(userPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());

    }


    /**
     * @api {POST} /client/bannerListByClient 获取首页banner
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiDescription 用户列表
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void bannerListByClient() {

        ResponseMsg result =  pageDataService.bannerListByClient();
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    @Test
    public void moneyListByClient() {
        ResponseMsg result =  pageDataService.moneyListByClient();
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }


    /**
     * @api {POST} /client/registerByClient 注册
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiParam {String} userName
     * @apiParam {String} realName
     * @apiParam {String} birthday
     * @apiParam {String} sex
     * @apiParam {String} phone
     * @apiParam {String} agentCode
     * @apiParam {String} register
     * @apiDescription 找回密码接口
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void registerByClient() {
        Users userPage = new Users();
        userPage.setUserName("louie"+new Random().nextInt(100));
        userPage.setRealName("ceshi");
        userPage.setPassword("123456");
        userPage.setEmail("12313@qq.com");
        userPage.setPhone("13714488403");
        userPage.setSex(1);
        userPage.setBirthday("1922-05-26");
        userPage.setAgentCode("test");
        userPage.setRegisterIp("127.0.0.1");

        ResponseMsg result =  pageDataService.registerByClient(userPage);
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    @Test
    public void logoutByClient() {

    }

    /**
     * @api {POST} /client/systemTimeByClient 获取系统时间
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiDescription 找回密码接口
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void systemTimeByClient() {
        ResponseMsg msg = new ResponseMsg();
        msg.setData(new Date());
        msg.setStatus(ResponseMsg.success);
    }


    /**
     * @api {POST} /client/systemNoticeByClient 系统通知
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiDescription 找回密码接口
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void systemNoticeByClient() {
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.systemNoticeByClient();
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/systemUnreadMessageByClient 待读系统消息
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void systemUnreadMessageByClient() {

        ResponseMsg result = new ResponseMsg();

        SystemMessage SystemMessage = new SystemMessage();
        SystemMessage.setUserId(userId);
        result =  pageDataService.systemUnreadMessageByClient(SystemMessage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/updateSystemMessageByClient 未读改成已读
     * @apiGroup IndexController
     * @apiVersion 0.0.1
     * @apiParam {int} id 字段消息 id 对象 SystemMessage id字段
     * @apiParam {int} isread 1:没有读过 2 已经读过
     * @apiDescription 未读改成已读
     * @apiSuccessExample {json} 返回样例:
     * {"retCode":"success",content{}}
     */
    @Test
    public void updateSystemMessageByClient() {
        ResponseMsg result = new ResponseMsg();
        SystemMessageUser systemMessageUser = new SystemMessageUser();
        systemMessageUser.setId(11);
        systemMessageUser.setIsread(2);
        result =  pageDataService.updateSystemMessageByClient(systemMessageUser);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/systemMessageByClient 系统消息
     * @apiGroup SystemMessageController
     * @apiVersion 0.0.1
     * @apiDescription 系统消息
     * @apiParam {int} userId
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void systemMessageByClient() {
        SystemMessage systemMessage = new SystemMessage();
        systemMessage.setUserId(userId);
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.systemMessageByClient(systemMessage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/promotionListByClient 优惠列表
     * @apiGroup PromotionController
     * @apiVersion 0.0.1
     * @apiDescription 优惠列表
     * @apiParam {int} activityType
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void promotionListByClient() {
        ResponseMsg result = new ResponseMsg();
        Activity activityPage = new Activity();
        result =  pageDataService.promotionListByClient(activityPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/userRecordsByClient 用户的交易记录
     * @apiGroup RecordsController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} operateType 1:存款 2:取款 3:转入游戏 4：转出游戏 5 bonus 6:佣金 7 rebate 8 fraud
     * @apiParam {String} pageNumber
     * @apiParam {int} userId
     * @apiParam {int} status 1 pending 2 review  3 success 4 reject
     * @apiParam {int} timeRange 时间范围 对应网页的1 周 1年
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void userRecordsByClient() {
        OperateRecords operateRecordsPage = new OperateRecords();
        operateRecordsPage.setUserId(userId);
        operateRecordsPage.setOperateType(1);
        operateRecordsPage.setStatus(1);
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.userRecordsByClient(operateRecordsPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));

        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/sendEmailVerifyCodeByClient 发送邮箱验证码
     * @apiGroup SendMsgController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {String} email
     * @apiParam {String} emailVerifyCode
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void sendEmailVerifyCodeByClient() {
        Users userPage = new Users();
        userPage.setUserId(userId);
        userPage.setEmailVerifyCode("123");
        userPage.setEmail("1653486645@qq.com");
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.sendEmailVerifyCodeByClient(userPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/sendPhoneVerifyCodeByClient 发送手机验证码
     * @apiGroup SendMsgController
     * @apiVersion 0.0.1
     * @apiDescription
     * @apiParam {int} userId
     * @apiParam {String} phone
     * @apiParam {String} phoneVerifyCode
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void sendPhoneVerifyCodeByClient() {
        Users userPage = new Users();
        userPage.setUserId(userId);
        userPage.setPhoneVerifyCode("123");
        userPage.setPhone("13714488403");
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.sendPhoneVerifyCodeByClient(userPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));

        assertEquals(ResponseMsg.success, result.getStatus());
    }



    /**
     * @api {POST} /client/transferByClient  转账
     * @apiGroup UserCenterController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {String} userName
     * @apiParam {String} lastloginIp
     * @apiParam {int} fromGame
     * @apiParam {int} toGame
     * @apiParam {int} transferType 1 转入 depost 2 转出 withdrawal
     * @apiParam {int} transferAmount
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void transferByClient() {
        Transfer transferPage = new Transfer();
        transferPage.setUserId(userId);
        transferPage.setUserName("testName");
        transferPage.setFromGame("Main");
        transferPage.setLastloginIp("127.0.0.1");
        transferPage.setToGame("SB");
        transferPage.setTransferType(1);
        transferPage.setTransferAmount(11);
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.transferByClient(transferPage);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }

    /**
     * @api {POST} /client/withdrawalSubmitByClient  提款申请
     * @apiGroup WithdrawalController
     * @apiVersion 0.0.1
     * @apiDescription 交易记录
     * @apiParam {int} userId
     * @apiParam {String} requestWithdrawalAmount
     * @apiParam {int} userBankId
     * @apiParam {int} lastloginIp
     * @apiSuccess {String} status 消息状态 success failed
     */
    @Test
    public void withdrawalSubmitByClient() {
        Withdrawal withdrawalPage = new Withdrawal();
        withdrawalPage.setUserId(userId);
        withdrawalPage.setUserBankId(1);
        withdrawalPage.setRequestWithdrawalAmount(100);
        withdrawalPage.setLastloginIp("127.0.0.1");
        ResponseMsg result = new ResponseMsg();
        result =  pageDataService.withdrawalSubmitByClient(withdrawalPage);
        result.setStatus(ResponseMsg.success);
        System.out.println(com.alibaba.fastjson.JSON.toJSON(result));
        assertEquals(ResponseMsg.success, result.getStatus());
    }


    public PageDataService getPageDataService() {
        return pageDataService;
    }

    public void setPageDataService(PageDataService pageDataService) {
        this.pageDataService = pageDataService;
    }
}